package sudoku;

public class Board 
{
	private char[][] board = new char[9][9]; 
	
	public char[][] getboard()
	{	return board;	}
	
	public void setboard(int y,int x,char i)
	{	board[y][x]=i;	}
	
	public void boardcopy(char[][] source)
	{		
		for(int i=0; i<9; i++)
			for (int j=0; j<9; j++)
				board[i][j]=source[i][j];
	}	
	
	private void format_display(int x, int y)
	{
		System.out.println("-------------------------------");
		  for(int i = x; i < y; i++) 
		   {    System.out.print("|");
	            for(int j = 0; j < 3; j++) 
	               	System.out.print(" " +board[i][j] + " "); 	            	            
	            System.out.print("|");	            
	            for(int j = 3; j < 6; j++) 
	            	System.out.print(" " +board[i][j] + " "); 	                        
	            System.out.print("|");
	            for(int j = 6; j < 9; j++) 
	               	System.out.print(" " +board[i][j] + " "); 
	            System.out.print("|");
	            System.out.println();  
	       } 
		
	}
	public void display()
	{
		format_display(0,3);  
		format_display(3,6);  
		format_display(6,9); 		   
	   System.out.println("-------------------------------");
	}

}
















